<template>
	<scroll-view class="content" scroll-y="true">
		<view class="video-box">
			<video 
			 object-fit="cover" 
			 page-gesture="true"
			 ref="video"
			 :duration="0"
			 :autoplay="true"
			 id="myVideo"
			 :src="video.url">
			 </video>
		</view>
		<view class="video-content">
			<view class="video-content-box">
				<view><text>{{video.title}}</text></view>
				<view v-show="video.content != ''"><text>{{video.content}}</text></view>
			</view>
		</view>
	</scroll-view>
</template>

<script>
	export default {
		// components:{list},
		data() {
			return {
				video:{},
				title: '',
				videoContext:null,
			}
		},
		onLoad(option) {
			// this.video.id = option.videoId
			this.video.url = option.url
			this.video.title = option.title
			this.video.content = option.content == null?'':option.content
			// this.video.image = option.url.replace('.mp4','.jpg')
			this.videoContext = uni.createVideoContext('myVideo');
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.f-wrap{
		display: flex;
		flex-wrap: wrap; 
	}
	.controls-title{
		width: 100rpx;
		height: 60rpx;
		border: 1rpx solid #FFFFFF;
		text-align: center;
	    border-radius: 40rpx;
		position:absolute;
		top:130rpx;
		right: 20rpx;
		color: #FFFFFF;
		line-height: 60rpx;
		font-size: 20rpx;
		
	}
	.content {
		width: 100vw;
		height: 100vh;
		background: #1a1a26;
		.video-box{
			width: 100%;
			// height: 520rpx;
			&>video{
				width: 100%;
				// height: 400rpx;
			}
			.video-box-content{
				width: 95%;
				height: 100rpx;
				background: #007AFF;
				margin: 0 auto;
				margin-top: 10rpx;
				border-radius: 10rpx;
				overflow: hidden;
				image{
					width: 100%;
					height: 100%;
				}
			}
		}
		.video-content{
			width: 95%;
			height: 200rpx;
			margin: 0 auto;
			border-radius: 10rpx;
			overflow: hidden;
			// background: #007AFF;
			position: relative;
			margin-top: 30rpx;
			.video-content-box{
				border-bottom: 1rpx solid #808080;
				padding-bottom: 10rpx;
				&>view:nth-child(1){
					font-size: 34rpx;
					font-weight: 400;
					color: #FFFFFF;
					margin-bottom: 10rpx;
				}
				&>view:nth-child(2){
					font-size: 20rpx;
					font-weight: 400;
					color: #C0C0C0;
				}
				&>view:nth-child(3){
					font-size: 26rpx;
					font-weight: 400;
					color: #C0C0C0;
					position: absolute;
					top: 20rpx;
					right: 0rpx;
				}
			}
			
		}
		.video-Anthology{
			width: 95%;
			height: 200rpx;
			margin: 0 auto;
			margin-top: 10rpx;
			border-radius: 10rpx;
			// background: #007AFF;
			.video-Anthology-title{
				width: 100%;
				height: 50rpx;
				// border: 1px solid;
				position: relative;
				color: #C0C0C0;
				
				.video-Anthology-box{
					position: absolute;
					top: 10rpx;
					right: 0rpx; 
					font-size: 26rpx;
				}
				
			}
			.video-Anthology-list{
				width: 100%;
				height: 110rpx;
				border-bottom: 1rpx solid #808080;
				padding-bottom: 10rpx;
				.Anthology-list{
					
					.video-Anthology-list-scroll-box{
						width: 100rpx;
						height: 100rpx;
						background: #2c2a37;
						color: #FFFFFF;
						border-radius: 10rpx;
						text-align: center;
						line-height: 100rpx;
						margin-right: 20rpx;
						
					}
				}
				
			}
			
			
		}
		.video-guess{
			width: 95%;
			height: auto;
			margin: 0 auto;
			margin-top: 10rpx;
			// background: #007AFF;
			border-radius: 10rpx;
			&>view:nth-child(1){
				font-size: 34rpx;
				font-weight: 400;
				color: #FFFFFF;
				margin-bottom: 10rpx;
			}
			.video-guess-list{
				width: 100%;
				height: auto;
				.video-guess-list-box{
					width: 30vw;
					height: 400rpx;
					margin-right: 2.5vw;
					border-radius: 10rpx;
					overflow: hidden;
					// border: 1rpx solid #FFFFFF;
					margin-top: 10rpx;
					&:nth-child(3n){
						margin-right: 0rpx;
					}
					&>image{
						width: 100%;
						height: 330rpx;
					}
					.guess-text{
						color: #FFFFFF;
						overflow: hidden;
						white-space: nowrap;
						text-overflow: ellipsis;
						
					}
				}
			}
		}
		.video-guessBox{
			width: 100vw;
			height: 100rpx;
			background: #1a1a26;
			position: fixed;
			bottom: 0rpx;
			z-index: 999;
		}
		
	}
	/* comment */
	page {
	    background-color: #f8f8f8;
	}
	
	.uni-padding-wrap {
	    padding: 30upx;
	}
	
	view {
	    font-size: 28upx;
	}
	
	.uni-comment {
	    padding: 5rpx 0;
	    display: flex;
	    flex-grow: 1;
	    flex-direction: column;
		margin-bottom: 100rpx;
	}
	
	.uni-comment-list {
	    flex-wrap: nowrap;
	    padding: 10rpx 0;
	    margin: 10rpx 0;
	    width: 100%;
	    display: flex;
	}
	
	.uni-comment-face {
	    width: 70upx;
	    height: 70upx;
	    border-radius: 100%;
	    margin-right: 20upx;
	    flex-shrink: 0;
	    overflow: hidden;
	}
	
	.uni-comment-face image {
	    width: 100%;
	    border-radius: 100%;
	}
	
	.uni-comment-body {
	    width: 100%;
	}
	
	.uni-comment-top {
	    line-height: 1.5em;
	    justify-content: space-between;
	}
	
	.uni-comment-top text {
	    color: #0A98D5;
	    font-size: 24upx;
	}
	
	.uni-comment-date {
	    line-height: 38upx;
	    flex-direction: row;
	    justify-content: space-between;
	    display: flex !important;
	    flex-grow: 1;
		color: #808080;
	}
	
	.uni-comment-date view {
	    color: #FFFFFF;
	    font-size: 24upx;
	    line-height: 38upx;
	}
	
	.uni-comment-content {
	    line-height: 1.6em;
	    font-size: 28upx;
	    padding: 8rpx 0;
		color: #fff;
	}
	.video-guessBox input{
		width: 560rpx;
		height: 80rpx;
		border: 1rpx solid;
		border-radius: 70rpx;
		margin-top: 10rpx;
		margin-left: 10rpx;
		border: 1rpx solid #FFFFFF;
	}
	.guess-but{
		width: 130rpx;
		height: 70rpx;
		background-color: #ff0000;
		font-size: 20rpx;
		color: #FFFFFF;
		margin-top: 10rpx;
		border: 1rpx solid transparent;
	}
	
	.block {
		position: absolute;
		width: 100%;
		height: 390rpx;
		background-color: rgba($color: #000000, $alpha: .3);
		left: 0;
		top: 0;
		display: flex;
		justify-content: center;
		align-items: center;
	
		.sanjia {
			width: 0;
			height: 0;
			border-top: 12px solid transparent;
			border-left: 17px solid #FFFFFF;
			border-bottom: 12px solid transparent;
		}
	}
</style>